﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="WorkTimeLeaveList.aspx.cs" Inherits="WorkTimeN_WorkTimeLeaveList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        allowadd="True" allowdelete="True" allowprint="True" allowupdate="True" alwaysclose="False"
        autoapplyforinsert="False" autorecordlock="False" autorecordlockmode="NoneReload"
        cachedataset="True" commandname="" commandtext="" datamember="View_WorkTime_Leave"
        eof="True" keyvalues="" lastindex="-1" marker="'" masterdatasource="" packetrecords="100"
        quoteprefix="[" quotesuffix="]" remotename="" selectcommand="" tablename="" selectalias="Usasdb">
    </infolight:webdatasource>
    <infolight:webclientquery id="ClientQuery" runat="server" datasourceid="Master" innertable="False"
        keepcondition="False" font-names="Simsun" font-size="Small" gaphorizontal="20"
        gapvertical="10">
        <columns>
                <InfoLight:WebQueryColumns Caption="员工编号" Column="EmployeeId" ColumnType="ClientQueryRefValColumn"
                    DefaultValue="" NewLine="True" NotNull="False" NotNullBackColor="White" Text=""
                    WebRefVal="QueryEmp" Width="120" />
                <InfoLight:WebQueryColumns Caption="请假类型编号" Column="LeaveTypeId" ColumnType="ClientQueryComboBoxColumn"
                    DefaultValue="" NewLine="False" NotNull="False" NotNullBackColor="White" Text="" Width="120" WebRefVal="QueryLeaveType" />
                <InfoLight:WebQueryColumns Caption="起始时间" Column="DateFrom" ColumnType="ClientQueryCalendarColumn"
                    DefaultValue="" NewLine="True" NotNull="False" NotNullBackColor="White" Operator="&gt;="
                    Text="" Width="120" />
                <InfoLight:WebQueryColumns Caption="终止时间" Column="DateTo" ColumnType="ClientQueryCalendarColumn"
                    DefaultValue="" NewLine="False" NotNull="False" NotNullBackColor="White" Operator="&lt;="
                    Text="" Width="120" />
                <InfoLight:WebQueryColumns Caption="请假时数(&gt;=)" Column="LeaHours" DefaultValue="" NewLine="True"
                    NotNull="False" NotNullBackColor="White" Text="" Width="120" Operator="&gt;=" />
                <InfoLight:WebQueryColumns Caption="工作流标志" Column="FlowFlag" ColumnType="ClientQueryComboBoxColumn"
                    DefaultValue="" NewLine="False" NotNull="False" NotNullBackColor="White" Text="" Width="120" WebRefVal="QueryFlowFlag" />
            </columns>
    </infolight:webclientquery>
    <infolight:webdatasource id="WLeaType" runat="server" allowadd="True" allowdelete="True"
        allowprint="True" allowupdate="True" alwaysclose="False" autoapply="False" autoapplyforinsert="False"
        autorecordlock="False" autorecordlockmode="NoneReload" cachedataset="True" commandname=""
        commandtext="" eof="True" keyvalues="" lastindex="-1" marker="'" masterdatasource=""
        packetrecords="100" quoteprefix="[" quotesuffix="]" selectalias="Usasdb" selectcommand="select WorkTime_SV_LeaveType.LeaveTypeId,WorkTime_SV_LeaveType.LeaveTypeName,WorkTime_SV_LeaveType.IsSalaryLeave from WorkTime_SV_LeaveType"
        tablename="">
    </infolight:webdatasource>
    <infolight:webdatasource id="wsFlowFlag" runat="server" selectalias="Usasdb" selectcommand="select Sys_FlowFlag.FlowFlag,Sys_FlowFlag.FlowFlagName from Sys_FlowFlag"
        cachedataset="True">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsWorkTime_YearHolidayEmployeeId" runat="server" selectalias="Usasdb"
        selectcommand="select Employees.EmployeeID,Employees.EmpName,Department.DepartmentName FROM Employees&#13;&#10; left join Department on Employees.DepartmentId=Department.DepartmentId"
        cachedataset="True">
    </infolight:webdatasource>
    <infolight:webrefval id="QueryEmp" runat="server" allowadddata="False" bindingtext=""
        bindingvalue='<%# Bind("EmployeeId") %>' buttonimageurl="../Image/refval/RefVal.gif"
        datasourceid="wdsWorkTime_YearHolidayEmployeeId" datatextfield="EmpName" datavaluefield="EmployeeID"
        multilanguage="False" postbackbutonclick="False" readonly="False" resxdataset=""
        resxfilepath="" updatepanelid="" usebuttonimage="True" visible="False" width="130px">
        <columns>
                <InfoLight:WebRefColumn ColumnName="EmployeeID" HeadText="员工编号" Width="100" />
                <InfoLight:WebRefColumn ColumnName="EmpName" HeadText="员工姓名" Width="100" />
                <InfoLight:WebRefColumn ColumnName="DepartmentName" HeadText="所在部门" Width="100" />
            </columns>
    </infolight:webrefval>
    <infolight:webrefval id="QueryLeaveType" runat="server" datasourceid="WLeaType" datatextfield="LeaveTypeName"
        datavaluefield="LeaveTypeId" visible="False" width="144px">
        <columns>
                <InfoLight:WebRefColumn ColumnName="LeaveTypeId" HeadText="请假类型编号" Width="100" />
                <InfoLight:WebRefColumn ColumnName="LeaveTypeName" HeadText="请假类型名称" Width="100" />
            </columns>
    </infolight:webrefval>
    <infolight:webrefval id="QueryFlowFlag" runat="server" datasourceid="wsFlowFlag"
        datatextfield="FlowFlagName" datavaluefield="FlowFlag" visible="False" width="136px">
        <columns>
                <InfoLight:WebRefColumn ColumnName="FlowFlag" HeadText="FlowFlag" Width="100" />
                <InfoLight:WebRefColumn ColumnName="FlowFlagName" HeadText="FlowFlagName" Width="100" />
            </columns>
    </infolight:webrefval>
    <infolight:webvalidate id="wvView_WorkTime_Leave" runat="server" datamember="View_WorkTime_Leave"
        datasourceid="Master" duplicatecheck="False" duplicatecheckmode="ByLocal" forecolor="Red"
        validatechar="*" validatecolor="Red" validatestyle="ShowLable">
        <fields>
<InfoLight:ValidateFieldItem FieldName="LeaveId" CheckNull="True"></InfoLight:ValidateFieldItem>
<InfoLight:ValidateFieldItem FieldName="EmployeeId" CheckNull="True"></InfoLight:ValidateFieldItem>
<InfoLight:ValidateFieldItem FieldName="DateFrom" CheckNull="True"></InfoLight:ValidateFieldItem>
<InfoLight:ValidateFieldItem FieldName="DateTo" CheckNull="True"></InfoLight:ValidateFieldItem>
   </fields>
    </infolight:webvalidate>
    <infolight:webnavigator id="WebNavigator1" runat="server" bindingobject="wgvMaster"
        width="100%" height="22px" statusstrip="WebStatusStrip1" showdatastyle="GridStyle"
        oncommand="WebNavigator1_Command" cssclass="NavigatorBar" ctlheight="25">
        <navcontrols>
                <InfoLight:ControlItem ControlName="Query" ControlText="琩高" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/query.gif" MouseOverImageUrl="../image/uipics/query2.gif"
                    Size="25" />
                <InfoLight:ControlItem ControlName="Print" ControlText="ゴ" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/print.gif" MouseOverImageUrl="../image/uipics/print2.gif"
                    Size="25" />
               
                <InfoLight:ControlItem controlname="Add" controltext="add" controltype="Image" controlvisible="True"
                disenableimageurl="../Image/UIPics/AddSheet2.gif" imageurl="../Image/UIPics/AddSheet.gif"
                mouseoverimageurl="../Image/UIPics/AddSheet2.gif" size="80">
            </InfoLight:ControlItem>
             <InfoLight:ControlItem ControlName="ClientQuery" ControlText="查看流程图" ControlType="Image"
                    ControlVisible="True" ImageUrl="../image/uipics/querySheet.gif" MouseOverImageUrl="../image/uipics/querySheet2.gif"
                    Size="80" />
            </navcontrols>
        <navstates>
                <InfoLight:WebNavigatorStateItem StateText="Initial" />
                <InfoLight:WebNavigatorStateItem StateText="Browsed" />
                <InfoLight:WebNavigatorStateItem StateText="Inserting" />
                <InfoLight:WebNavigatorStateItem StateText="Editing" />
                <InfoLight:WebNavigatorStateItem StateText="Applying" />
                <InfoLight:WebNavigatorStateItem StateText="Changing" />
                <InfoLight:WebNavigatorStateItem StateText="Querying" />
                <InfoLight:WebNavigatorStateItem StateText="Printing" />
            </navstates>
        <queryfields>
                <InfoLight:WebQueryField Caption="员工编号" Condition="=" DefaultValue="" FieldName="EmployeeId"
                    Mode="RefVal" RefVal="QueryEmp" />
                <InfoLight:WebQueryField Caption="请假类型编号" Condition="=" DefaultValue="" FieldName="LeaveTypeId"
                    Mode="ComboBox" RefVal="QueryLeaveType" />
                <InfoLight:WebQueryField Caption="工作流标志" Condition="=" DefaultValue="" FieldName="FlowFlag"
                    Mode="RefVal" RefVal="QueryFlowFlag" />
            </queryfields>
    </infolight:webnavigator>
    <table cellpadding="0" cellspacing="5" class="TbSearch">
        <tr>
            <td colspan="2" rowspan="5">
                <asp:Panel ID="Panel1" runat="server" Height="100%" Width="100%" Font-Size="Small">
                </asp:Panel>
            </td>
            <td style="width: 30%">
            </td>
        </tr>
        <tr>
            <td align="center" style="text-align: right;">
                <span class="roundbtn">
                    <asp:LinkButton ID="Button1" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;查 询&nbsp;&nbsp;&nbsp;&nbsp;"
                        OnClick="Button1_Click"></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 30%">
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
                <span class="roundbtn">
                    <asp:LinkButton ID="Button2" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;清 除&nbsp;&nbsp;&nbsp;&nbsp;"
                        OnClick="Button2_Click"></asp:LinkButton>
                </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 30%">
            </td>
        </tr>
    </table>
    <infolight:webgridview id="wgvMaster" runat="server" cellpadding="5" datasourceid="Master"
        forecolor="#333333" width="100%" aborticonurl="../Image/UIPics/Abort.gif" addiconurl="../Image/UIPics/Add.gif"
        applyiconurl="../Image/UIPics/Apply.gif" canceliconurl="../Image/UIPics/Cancel.gif"
        mouseoveraborticonurl="../Image/UIPics/Abort2.gif" mouseoveraddiconurl="../Image/UIPics/Add2.gif"
        mouseoverapplyiconurl="../Image/UIPics/Apply2.gif" mouseovercanceliconurl="../Image/UIPics/Cancel2.gif"
        mouseoverokiconurl="../Image/UIPics/OK2.gif" mouseoverqueryiconurl="../Image/UIPics/Query2.gif"
        okiconurl="../Image/UIPics/OK.gif" 
        queryiconurl="../Image/UIPics/Query.gif" headerstylewrap="False"
        backcolor="White" bordercolor="White" borderstyle="Groove" borderwidth="2px"
        datamember="View_WorkTime_Leave" editurl="../WorkTime/LeaveView.aspx" pagesize="15"
        onrowcommand="wgvMaster_RowCommand" 
        onrowdatabound="wgvMaster_RowDataBound">
        <pagersettings mode="NumericFirstLast" />
        <footerstyle backcolor="#507CD1" forecolor="White" font-bold="True"></footerstyle>
        <navcontrols>
                <InfoLight:ControlItem ControlName="Add" ControlText="add" ControlType="Image" ControlVisible="False"
                    DisenableImageUrl="../image/uipics/add3.gif" ImageUrl="../image/uipics/add.gif"
                    MouseOverImageUrl="../image/uipics/add2.gif" Size="25" />
</navcontrols>
        <columns>
<asp:TemplateField ShowHeader="False" Visible="False"><EditItemTemplate>
&nbsp;
</EditItemTemplate>
    <headerstyle wrap="False" />
<ItemTemplate>
<asp:ImageButton runat="server" Text="Select" CommandName="Select" ImageUrl="~/Image/UIPics/Select.gif" CausesValidation="False" id="ImageButton1"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
                 <asp:TemplateField HeaderText="删除" SortExpression="LeaveId">
                    <ItemTemplate>
                    <asp:ImageButton ID="del" runat="server" ImageUrl="../image/main/Error2.gif" ></asp:ImageButton> 
                    </ItemTemplate>
                     <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="请假单编号" SortExpression="LeaveId">
                    <ItemTemplate>
                    <a href='WorkTimeLeave.aspx?FLOWFILENAME=FL\WorkTimeLeave&NAVMODE=Modify&FLNAVMODE=Submit&sid=<%# Eval("LeaveId") %>&flowflag=<%# Eval("flowflag") %>&employeeid=<%# Eval("employeeid") %>'><%# Eval("LeaveId")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                
                <asp:BoundField DataField="EmployeeId" HeaderText="员工编号" SortExpression="EmployeeId" />
                <asp:BoundField DataField="EmpName" HeaderText="员工" SortExpression="EmpName" />
                <asp:BoundField DataField="DepartmentName" HeaderText="部门" SortExpression="DepartmentName" />
                <asp:TemplateField HeaderText="起始时间" SortExpression="DateFrom">
                    <edititemtemplate>
<InfoLight:WebDateTimePicker runat="server" DateTimeType="DateTime" DateFormat="None" Width="100px" ToolTip="DateFrom" UseButtonImage="True" MinYear="1950" MaxYear="2050" Localize="False" ID="wdtpView_WorkTime_LeaveDateFromE" Text='<%# Bind("DateFrom") %>'></InfoLight:WebDateTimePicker>
</edititemtemplate>
                    <footertemplate>
<InfoLight:WebDateTimePicker runat="server" DateTimeType="DateTime" DateFormat="None" Width="100px" ToolTip="DateFrom" UseButtonImage="True" MinYear="1950" MaxYear="2050" Localize="False" ID="wdtpView_WorkTime_LeaveDateFromF" Text='<%# Bind("DateFrom") %>'></InfoLight:WebDateTimePicker>
</footertemplate>
                    <itemtemplate>
<asp:Label runat="server" ToolTip="DateFrom" ID="lView_WorkTime_LeaveDateFrom" Text='<%# Bind("DateFrom") %>'></asp:Label>
</itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="终止时间" SortExpression="DateTo">
                    <edititemtemplate>
<InfoLight:WebDateTimePicker runat="server" DateTimeType="DateTime" DateFormat="None" Width="100px" ToolTip="DateTo" UseButtonImage="True" MinYear="1950" MaxYear="2050" Localize="False" ID="wdtpView_WorkTime_LeaveDateToE" Text='<%# Bind("DateTo") %>'></InfoLight:WebDateTimePicker>
</edititemtemplate>
                    <footertemplate>
<InfoLight:WebDateTimePicker runat="server" DateTimeType="DateTime" DateFormat="None" Width="100px" ToolTip="DateTo" UseButtonImage="True" MinYear="1950" MaxYear="2050" Localize="False" ID="wdtpView_WorkTime_LeaveDateToF" Text='<%# Bind("DateTo") %>'></InfoLight:WebDateTimePicker>
</footertemplate>
                    <itemtemplate>
<asp:Label runat="server" ToolTip="DateTo" ID="lView_WorkTime_LeaveDateTo" Text='<%# Bind("DateTo") %>'></asp:Label>
</itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="LeaveTypeName" HeaderText="请假分类" SortExpression="LeaveTypeName" />
                <asp:BoundField DataField="LeaHours" HeaderText="请假时数" SortExpression="LeaHours" />
                <asp:BoundField DataField="FlowFlagName" HeaderText="流程标志" SortExpression="FlowFlagName" />
</columns>
        <rowstyle backcolor="#EFF3FB"></rowstyle>
        <editrowstyle backcolor="#2461BF"></editrowstyle>
        <selectedrowstyle backcolor="#D1DDF1" forecolor="#333333" font-bold="True"></selectedrowstyle>
        <pagerstyle backcolor="LightBlue" forecolor="White" horizontalalign="Center"></pagerstyle>
        <headerstyle backcolor="DeepSkyBlue" forecolor="White" font-bold="True"></headerstyle>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
    </infolight:webgridview>
</asp:Content>
